home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / Telephones.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  44.6 KB  |  895 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Telephones.p
  3.  
  4.      Contains:    Telephone Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT Telephones;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __TELEPHONES__}
  28. {$SETC __TELEPHONES__ := 1}
  29.  
  30. {$I+}
  31. {$SETC TelephonesIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __DIALOGS__}
  38. {$I Dialogs.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __ERRORS__}
  41. {$I Errors.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED __EVENTS__}
  44. {$I Events.p}
  45. {$ENDC}
  46. {$IFC UNDEFINED __CTBUTILITIES__}
  47. {$I CTBUtilities.p}
  48. {$ENDC}
  49. {$IFC UNDEFINED __COMPONENTS__}
  50. {$I Components.p}
  51. {$ENDC}
  52.  
  53.  
  54. {$PUSH}
  55. {$ALIGN MAC68K}
  56. {$LibExport+}
  57.  
  58.  
  59. CONST
  60.     curTELVersion                = 3;                            {  current Telephone Manager version  }
  61.                                                                 {     the chooseXXX symbols are defined in CTBUtilities.(pah)  }
  62.     telChooseDisaster            = -2;
  63.     telChooseFailed                = -1;
  64.     telChooseAborted            = 0;
  65.     telChooseOKMinor            = 1;
  66.     telChooseOKMajor            = 2;
  67.     telChooseCancel                = 3;
  68.     telChooseOKTermChanged        = 4;
  69.  
  70. {$IFC UNDEFINED classTEL }
  71.                                                                 {  telephone tool file type  }
  72.     classTEL                    = 'vbnd';
  73.  
  74. {$ENDC}
  75.  
  76.                                                                 {  PHYSICAL TERMINAL CONSTANTS  }
  77.                                                                 {  INDEPENDENT HANDSET CONSTANTS  }
  78.     telIndHSOnHook                = 0;                            {  independent handset on hook  }
  79.     telIndHSOffHook                = 1;                            {  independent handset off hook  }
  80.     telIndHSDisconnected        = 0;                            {  handset disconnected from the line  }
  81.     telIndHSConnected            = 1;                            {  handset connected to the line  }
  82.                                                                 {  HOOK STATE CONSTANTS  }
  83.     telHandset                    = 1;                            {  handset hookswitch  }
  84.     telSpeakerphone                = 2;                            {  speakerphone 'on' switch  }
  85.     telDeviceOffHook            = 1;                            {  device off hook  }
  86.     telDeviceOnHook                = 0;                            {  device on hook  }
  87.                                                                 {  VOLUME CONTROL CONSTANTS  }
  88.     telHandsetSpeakerVol        = 1;                            {  volume of the handset speaker  }
  89.     telHandsetMicVol            = 2;                            {  sensitivity of the handset mic  }
  90.     telSpeakerphoneVol            = 3;                            {  speakerphone volume  }
  91.     telSpeakerphoneMicVol        = 4;                            {  sensitivity of the spkrphone mic  }
  92.     telRingerVol                = 5;                            {  volume of the ringer  }
  93.     telBuiltinSPVol                = 6;                            {  volume of the built-in speakerphone  }
  94.     telBuiltinSPMicVol            = 7;                            {  sensitivity of the built-in speakerphone mic  }
  95.     telVolSame                    = 0;                            {  leaves the volume at previous level  }
  96.     telVolMin                    = 1;                            {  turns volume down to minimum level, but not off  }
  97.     telVolMax                    = 100;                            {  highest level allowed by the Telephone Manager  }
  98.     telVolStateSame                = 0;                            {  leaves device in same state  }
  99.     telVolStateOff                = 1;                            {  turns the device off ,  }
  100.                                                                 {  but doesn't change the volume setting.  }
  101.                                                                 {  Use for mute functions.  }
  102.     telVolStateOn                = 2;                            {  turns the device on.  Volume setting is  }
  103.                                                                 {  the same as previously set. }
  104.                                                                 {  DISPLAY CONSTANTS  }
  105.     telNormalDisplayMode        = 1;                            {  normal display mode  }
  106.     telInspectMode                = 2;                            {  inspect display mode  }
  107.     telMiscMode                    = 3;                            {  miscellaneous display mode  }
  108.     telRetrieveMode                = 4;                            {  message retrieval mode  }
  109.     telDirectoryQueryMode        = 5;                            {  electronic directory mode  }
  110.     telEntireDisplay            = 0;                            {  entire Display  }
  111.                                                                 {  KEY PRESS CONSTANTS  }
  112.     telHangupKey                = 1;                            {  drop, or release, key pressed  }
  113.     telHoldKey                    = 2;                            {  hold key pressed  }
  114.     telConferenceKey            = 3;                            {  conference key pressed  }
  115.     telTransferKey                = 4;                            {  transfer key pressed  }
  116.     telForwardKey                = 5;                            {  call forward key pressed  }
  117.     telCallbackKey                = 6;                            {  call back key pressed  }
  118.     telDNDKey                    = 7;                            {  do not disturb key pressed  }
  119.     telCallPickupKey            = 8;                            {  call Pickup key pressed  }
  120.     telCallParkKey                = 9;                            {  call Park key pressed  }
  121.     telCallDeflectKey            = 10;                            {  call Deflect key pressed  }
  122.     telVoiceMailAccessKey        = 11;                            {  voice Mail Access key pressed  }
  123.     telCallRejectKey            = 12;                            {  call Reject key pressed  }
  124.     telOtherKey                    = 16;                            {  other key pressed  }
  125.     telKeyPadPress                = 1;                            {  key pressed on 12 digit keypad }
  126.     telFeatureKeyPress            = 2;                            {  feature Key Pressed  }
  127.     telTerminalEnabled            = 0;
  128.     telTerminalDisabled            = 1;
  129.     telUnknown                    = 0;                            {  unknown error  }
  130.     telTerminalHWDisconnected    = 1;                            {  terminal hardware is disconnected  }
  131.     telDeviceDriverClosed        = 2;                            {  device driver is closed  }
  132.                                                                 {  ALERT PATTERN  }
  133.     telPattern0                    = 0;
  134.     telPattern1                    = 1;
  135.     telPattern2                    = 2;
  136.     telPattern3                    = 3;
  137.     telPattern4                    = 4;
  138.     telPattern5                    = 5;
  139.     telPattern6                    = 6;
  140.     telPattern7                    = 7;
  141.     telPatternOff                = 8;
  142.     telPatternUndefined            = 15;                            {  DN TYPES  }
  143.     telAllDNs                    = 0;                            {  counts all types of DNs  }
  144.     telInternalDNs                = 1;                            {  connected to PBX or other non-public switch  }
  145.     telInternalDNsOnly            = 2;                            {  connected to PBX or other non-public switch  }
  146.                                                                 {  and able to place internal calls only  }
  147.     telExternalDNs                = 3;                            {  connected to public network  }
  148.     telDNTypeUnknown            = 4;                            {  DN type unknown  }
  149.                                                                 {  DN USAGE  }
  150.     telDNNotUsed                = 0;                            {  DN is not used - onhook  }
  151.     telDNPOTSCall                = 1;                            {  DN used for POTs call  }
  152.     telDNFaxCall                = 2;                            {  DN used for fax call  }
  153.     telDNDataCall                = 3;                            {  DN used for data call  }
  154.     telDNAlerting                = 4;                            {  Incoming call at DN  }
  155.     telDNUnknownState            = 5;                            {  DN is in unknown state  }
  156.                                                                 {  CALL FORWARDING TYPES  }
  157.     telForwardImmediate            = 1;                            {  immediately forward calls  }
  158.     telForwardBusy                = 2;                            {  forward on Busy  }
  159.     telForwardNoAnswer            = 3;                            {  forward on No answer  }
  160.     telForwardBusyNA            = 4;                            {  forwarding for busy and no answer }
  161.     telForwardTypeUnknown        = 5;                            {  type of forwarding is unknown  }
  162.                                                                 {  CALL FORWARDING MESSAGES  }
  163.     telForwardCleared            = 0;                            {  forwarding has been cleared  }
  164.     telForwardEst                = 1;                            {  forwarding has been established }
  165.     telForwardFailed            = 2;                            {  attempt to setup forwarding has failed }
  166.                                                                 {  DO NOT DISTURB TYPES  }
  167.     telDNDIntExt                = 0;                            {  do not disturb for all internal and external calls }
  168.     telDNDExternal                = 1;                            {  do not disturb for external calls only  }
  169.     telDNDInternal                = 2;                            {  do not disturb for internal calls only  }
  170.     telDNDNonIntercom            = 3;                            {  do not disturb for all calls except intercom  }
  171.                                                                 {  DO NOT DISTURB MESSAGES  }
  172.     telDNDCleared                = 0;                            {  do not disturb has been cleared  }
  173.     telDNDEst                    = 1;                            {  do not disturb has been established  }
  174.     telDNDFailed                = 2;                            {  attempt to setup do not disturb has failed  }
  175.                                                                 {  VOICE MAIL MESSAGES  }
  176.     telAllVoiceMessagesRead        = 0;                            {  all messages have been read, none are  waiting  }
  177.                                                                 {  to be read  }
  178.     telNewVoiceMessage            = 1;                            {  a new message has arrived or messages are waiting  }
  179.                                                                 {  for this DN  }
  180.                                                                 {  DNSELECT MESSAGE  }
  181.     telDNDeselected                = 0;                            {  DN has been deselected  }
  182.     telDNSelected                = 1;                            {  DN has been selected  }
  183.                                                                 {  CALL ORIGINATORS  }
  184.     telInternalCall                = 0;                            {  return nth internal CA  }
  185.     telExternalCall                = 1;                            {  return nth external CA  }
  186.     telUnknownCallOrigin        = 2;                            {  unknown call type  }
  187.     telAllCallOrigins            = 2;                            {  return nth CA internal or external  }
  188.                                                                 {  CALL TYPES  }
  189.     telVoiceMailAccessOut        = -7;
  190.     telPageOut                    = -6;
  191.     telIntercomOut                = -5;
  192.     telCallbackOut                = -4;
  193.     telPickup                    = -3;
  194.     telParkRetrieve                = -2;
  195.     telNormalOut                = -1;
  196.     telUnknownCallType            = 0;
  197.     telNormalIn                    = 1;
  198.     telForwardedImmediate        = 2;
  199.     telForwardedBusy            = 3;
  200.     telForwardedNoAnswer        = 4;
  201.     telTransfer                    = 5;
  202.     telDeflected                = 6;
  203.     telIntercepted                = 7;
  204.     telDeflectRecall            = 8;
  205.     telParkRecall                = 9;
  206.     telTransferredRecall        = 10;
  207.     telIntercomIn                = 11;
  208.     telCallbackIn                = 12;                            {  DIAL TYPES  }
  209.     telDNDialable                = 0;                            {  this DN could be dialed via TELSetupCall  }
  210.     telDNNorthAmerican            = 1;                            {  rmtDN is standard North America 10 digit number  }
  211.     telDNInternational            = 2;                            {  rmtDN is an international number  }
  212.     telDNAlmostDialable            = 3;                            {  rmtDN is almost dialable,  }
  213.                                                                 {  missing prefix such as 9 or 1  }
  214.     telDNUnknown                = 15;                            {  unknown whether DN is dialable  }
  215.                                                                 {  CALL PROGRESS MESSAGES  }
  216.     telCAPDialTone                = 1;                            {  dial tone  }
  217.     telCAPRinging                = 2;                            {  destination CA is alerting  }
  218.     telCAPDialing                = 3;                            {  dialing the other end  }
  219.     telCAPReorder                = 4;                            {  reorder  }
  220.     telCAPBusy                    = 5;                            {  busy  }
  221.     telCAPRouted                = 6;                            {  call routed; rmtDN will hold the routing directory  }
  222.                                                                 {  number routeDN and routePartyName have been updated  }
  223.     telCAPRoutedOff                = 7;                            {  call routed off-network; no further progress will  }
  224.                                                                 {  be available  }
  225.     telCAPTimeout                = 8;                            {  call timed out  }
  226.     telCAPUpdate                = 9;                            {  name and rmtDN information has been updated  }
  227.     telCAPPrompt                = 10;                            {  the network is prompting for more information  }
  228.     telCAPWaiting                = 11;                            {  call is proceeding, but there is no response yet  }
  229.                                                                 {  from the destination  }
  230.     telCAPCPC                    = 12;                            {  telephone tool detected CPC signal  }
  231.     telCAPNoDialTone            = 13;                            {  dial tone not detected  }
  232.     telCAPUnknown                = 15;                            {  call progress state unknown  }
  233.     telCAPDialDisabled            = 16;                            {  Blacklisting: Dial Disabled  }
  234.     telCAPBlacklistedNumber        = 17;                            {  Blacklisting: Blacklisted Number  }
  235.     telCAPForbiddenNumber        = 18;                            {  Blacklisting: Forbidden Number  }
  236.     telCAPModemGuardTime        = 19;                            {  Modem Guard Timein force, unable to dial  }
  237.     telCAPLCDetected            = 20;                            {  trying to dial a number while the handset is offhook  }
  238.     telCAPLostLC                = 21;                            {  trying manual dial or answer while handset not off hook  }
  239.                                                                 {  or also lost line current during dialing.  }
  240.                                                                 {  OUTGOING CALL MESSAGES  }
  241.     telPhysical                    = 0;                            {  user lifted handset and initiated call  }
  242.     telProgrammatic                = 1;                            {  programmatic initiation of outgoing call  }
  243.                                                                 {  DISCONNECT MESSAGES  }
  244.     telLocalDisconnect            = 0;                            {  local party, this user, responsible for disconnect  }
  245.     telRemoteDisconnect            = 1;                            {  remote party responsible for disconnect  }
  246.                                                                 {  DISCONNECT TYPES  }
  247.     telCADNormal                = 1;                            {  normal disconnect  }
  248.     telCADBusy                    = 2;                            {  remote user busy  }
  249.     telCADNoResponse            = 3;                            {  remote not responding  }
  250.     telCADRejected                = 4;                            {  call rejected  }
  251.     telCADNumberChanged            = 5;                            {  number changed  }
  252.     telCADInvalidDest            = 6;                            {  invalid destination address  }
  253.     telCADFacilityRejected        = 7;                            {  requested facility rejected  }
  254.     telCADUnobtainableDest        = 9;                            {  destination not obtainable  }
  255.     telCADCongested                = 10;                            {  network congestion  }
  256.     telCADIncompatibleDest        = 11;                            {  incompatible destination  }
  257.     telCADTimeout                = 12;                            {  call timed out  }
  258.     telCADUnknown                = 15;                            {  reason unknown  }
  259.                                                                 {  CONFERENCE MESSAGES  }
  260.     telConferencePrepFailed        = 0;                            {  conference could not be prepared  }
  261.     telConferencePending        = 1;                            {  conference prepared successfully  }
  262.     telConferenceEstFailed        = 2;                            {  conference could not be established  }
  263.     telConferenceEst            = 3;                            {  conference established  }
  264.                                                                 {  TRANSFER MESSAGES  }
  265.     telTransferPrepFailed        = 0;                            {  transfer could not be prepared  }
  266.     telTransferPending            = 1;                            {  transfer prepared successfully  }
  267.     telTransferEst                = 2;                            {  consult or blind xfer successful  }
  268.     telTransferFailed            = 3;                            {  consult or blind xfer failed  }
  269.     telTransferred                = 4;                            {  message to originator of CA specifying  }
  270.                                                                 {  that call was transferred to rmtDN  }
  271.                                                                 {  HOLD MESSAGES  }
  272.     telHoldCleared                = 0;
  273.     telHoldEst                    = 1;
  274.     telHoldFailed                = 2;                            {  RECEIVE DIGIT MESSAGES  }
  275.     telDigitAudible                = 0;
  276.     telDigitNotAudible            = 1;                            {  CALL PARK MESSAGES  }
  277.     telCallParkEst                = 1;                            {  call has been successfully parked  }
  278.     telCallParkRetrieveEst        = 2;                            {  parked Call has been successfully retrieved  }
  279.     telCallParkFailed            = 3;                            {  attempt to setup call park has failed  }
  280.     telCallParkRetrieveFailed    = 4;                            {  attempt to retrieve parked call failed  }
  281.     telCallParkRecall            = 5;                            {  call park has been recalled  }
  282.                                                                 {  CALL BACK MESSAGES  }
  283.     telCallbackCleared            = 0;                            {  call back has been cleared  }
  284.     telCallbackEst                = 1;                            {  call back has been established  }
  285.     telCallbackNowAvail            = 2;                            {  call can be called back with TELCallBackNow  }
  286.                                                                 {  if CA is zero, else call IS calling back on CA  }
  287.     telCallbackFailed            = 3;                            {  attempt to setup callback has failed  }
  288.     telCallbackDesired            = 4;                            {  a user has called this terminal, received no  }
  289.                                                                 {  answer and desires this terminal to call it  }
  290.                                                                 {  back  }
  291.     telCallbackDesiredCleared    = 5;                            {  call back for no answer no longer desired  }
  292.     telCalledback                = 6;                            {  callback has occurred successfully  }
  293.                                                                 {  CALL REJECT MESSAGES  }
  294.     telCallRejectFailed            = 0;                            {  attempt to reject call has failed  }
  295.     telCallRejectEst            = 1;                            {  call successfully rejected  }
  296.     telCallRejected                = 2;                            {  message to originator that call was rejected  }
  297.                                                                 {  CALL DEFLECT MESSAGES  }
  298.     telCallDeflectFailed        = 0;                            {  attempt to deflect call has failed  }
  299.     telCallDeflectEst            = 1;                            {  call successfully deflected  }
  300.     telCallDeflectRecall        = 2;                            {  deflected call has been recalled  }
  301.     telCallDeflected            = 3;                            {  message to originator that call was deflected  }
  302.                                                                 {  to rmtDN  }
  303.     telAutoDeflectImmediate        = 4;                            {  a call was automatically deflected from this  }
  304.                                                                 {  terminal as a result of immediate call  }
  305.                                                                 {  forwarding  }
  306.     telAutoDeflectBusy            = 5;                            {  a call was automatically deflected from this  }
  307.                                                                 {  terminal as a result of call forwarding on busy  }
  308.     telAutoDeflectNoAnswer        = 6;                            {  a call was automatically deflected from this  }
  309.                                                                 {  terminal as a result of call forwarding on  }
  310.                                                                 {  no answer  }
  311.                                                                 {  CONFERENCE SPLIT MESSAGES  }
  312.     telConferenceSplitFailed    = 0;                            {  CA could not be split  }
  313.     telConferenceSplitEst        = 1;                            {  CA split successfully  }
  314.                                                                 {  CONFERENCE DROP MESSAGES  }
  315.     telConferenceDropFailed        = 0;                            {  CA could not be dropped  }
  316.     telConferenceDropped        = 1;                            {  CA dropped successfully  }
  317.                                                                 {  CALL PICKUP MESSAGES  }
  318.     telCallPickupEst            = 0;                            {  call pickup was successful  }
  319.     telCallPickupFailed            = 1;                            {  call pickup failed  }
  320.     telCallPickedUp                = 2;                            {  message to originator that call was picked  }
  321.                                                                 {  up at a different DN  }
  322.                                                                 {  PAGING MESSAGES  }
  323.     telPageEst                    = 0;                            {  paging was successful  }
  324.     telPageComplete                = 1;                            {  paging activity completed  }
  325.     telPageFailed                = 2;                            {  paging failed  }
  326.                                                                 {  INTERCOM MESSAGES  }
  327.     telIntercomEst                = 0;                            {  intercom was successful  }
  328.     telIntercomComplete            = 1;                            {  intercom activity completed  }
  329.     telIntercomFailed            = 2;                            {  intercom failed  }
  330.                                                                 {  MODEM TONE MESSAGES  }
  331.     telModemToneDetected        = 0;                            {  modem tone was detected  }
  332.     telModemToneCleared            = 1;                            {  modem tone went away  }
  333.                                                                 {  FAX TONE MESSAGES  }
  334.     telFaxToneDetected            = 0;                            {  fax tone was detected  }
  335.     telFaxToneCleared            = 1;                            {  fax tone went away  }
  336.                                                                 {  IN USE MESSAGES  }
  337.     telInUsePrivate                = 0;                            {  MADN is in use and can't be accessed  }
  338.     telInUseCanAccess            = 1;                            {  MADN is in use, and others can access it  }
  339.                                                                 {  and join in  }
  340.     telInUseCanMakePrivate        = 2;                            {  MADN is in use, but available for any one  }
  341.                                                                 {  person to access  }
  342.     telInUseCleared                = 3;                            {  MADN is no longer in use  }
  343.                                                                 {  CALL APPEARANCE STATES  }
  344.     telCAIdleState                = 0;                            {  a call doesn't exist at this time  }
  345.     telCAInUseState                = 1;                            {  the call is active but at another terminal  }
  346.     telCAOfferState                = 2;                            {  a call is being offered to the terminal  }
  347.     telCAQueuedState            = 3;                            {  a call is being queued at this terminal  }
  348.     telCAAlertingState            = 4;                            {  a call is alerting at the terminal  }
  349.     telCADialToneState            = 5;                            {  initiated outgoing call has dialtone  }
  350.     telCADialingState            = 6;                            {  initiated outgoing call is dialing  }
  351.     telCAWaitingState            = 7;                            {  initiated outgoing call is waiting for  }
  352.                                                                 {  response from destination  }
  353.     telCARingingState            = 8;                            {  the outgoing call is ringing.  }
  354.     telCABusyState                = 9;                            {  destination is busy or can't be reached  }
  355.     telCAHeldState                = 10;                            {  call has been put on hold by this terminal  }
  356.     telCAConferencedState        = 11;                            {  this CA is part of a conference now  }
  357.     telCAActiveState            = 12;                            {  the call is active and parties are free  }
  358.                                                                 {  to exchange data  }
  359.     telCAReorderState            = 13;                            {  CA is in a reorder state  }
  360.     telCAConferencedHeldState    = 14;                            {  CA is a conference call in a held state  }
  361.     telCAUnknownState            = 15;                            {  the call state is unknown  }
  362.                                                                 {  TERMINAL MESSAGE EVENTMASKS  }
  363.     telTermHookMsg                = $00000001;                    {  the hookswitch state has changed  }
  364.     telTermKeyMsg                = $00000002;                    {  a phone pad key has been depressed  }
  365.     telTermVolMsg                = $00000004;                    {  volume setting has changed  }
  366.     telTermDisplayMsg            = $00000008;                    {  display has changed  }
  367.     telTermEnableMsg            = $00000010;                    {  terminal has become enabled  }
  368.     telTermOpenMsg                = $00000020;                    {  terminal has been opened  }
  369.     telTermCloseMsg                = $00000040;                    {  terminal is shutting down  }
  370.     telTermResetMsg                = $00000080;                    {  terminal has been reset  }
  371.     telTermErrorMsg                = $00000100;                    {  hard equipment error  }
  372.     telTermIndHSStateChgMsg        = $00000200;                    {  change in handset state from inacive to  }
  373.                                                                 {  active or vice versa  }
  374.     telTermIndHSConnectMsg        = $00000400;                    {  independent handset connection has been changed  }
  375.     telTermKeyImmMsg            = $00000800;                    {  immidiate arrival of phone pad key  }
  376.     telTermVolStateMsg            = $00001000;                    {  volume state has changed  }
  377.     telTermOtherMsg                = $80000000;                    {  vendor defined error  }
  378.     telAllTermMsgs                = $00001FFF;                    {  mask to all non tool specific terminal events  }
  379.                                                                 {  DN MESSAGE EVENTMASK CONSTANTS  }
  380.     telDNForwardMsg                = $00000001;                    {  forward feature activity  }
  381.     telDNDNDMsg                    = $00000002;                    {  do not disturb feature activity  }
  382.     telDNVoiceMailMsg            = $00000004;                    {  message has arrived for this DN  }
  383.     telDNSelectedMsg            = $00000008;                    {  DN has been selected or deselected  }
  384.     telDNOtherMsg                = $80000000;                    {  a custom message for use by tools  }
  385.     telAllDNMsgs                = $0000000F;                    {  mask to all non tool specific dn events  }
  386.                                                                 {  CA MESSAGE EVENTMASK CONSTANTS  }
  387.     telCAAlertingMsg            = $00000001;                    {  CA is alerting   }
  388.     telCAOfferMsg                = $00000002;                    {  CA is being offered a call  }
  389.     telCAProgressMsg            = $00000004;                    {  call progress info for this CA  }
  390.     telCAOutgoingMsg            = $00000008;                    {  CA is initiating an outgoing call  }
  391.     telCADisconnectMsg            = $00000010;                    {  CA disconnected (dropped or rmt disc  }
  392.     telCAActiveMsg                = $00000020;                    {  CA is active and voice/data is free  }
  393.                                                                 {  to flow end to end  }
  394.     telCAConferenceMsg            = $00000040;                    {  conference activity on CA  }
  395.     telCATransferMsg            = $00000080;                    {  transfer feature activity  }
  396.     telCAHoldMsg                = $00000100;                    {  hold feature activity  }
  397.     telCADigitsMsg                = $00000200;                    {  remote signaling digits arrived  }
  398.     telCACallParkMsg            = $00000400;                    {  CA call park feature activity  }
  399.     telCACallbackMsg            = $00000800;                    {  CA call back feature activity   }
  400.     telCARejectMsg                = $00001000;                    {  CA is rejected  }
  401.     telCADeflectMsg                = $00002000;                    {  CA is deflected  }
  402.     telCAForwardMsg                = $00004000;                    {  CA is forwarded to this DN   }
  403.     telCAConferenceSplitMsg        = $00008000;                    {  conference split activity   }
  404.     telCAConferenceDropMsg        = $00010000;                    {  conference drop activity   }
  405.     telCAQueuedMsg                = $00020000;                    {  CA has been queued   }
  406.     telCAInUseMsg                = $00040000;                    {  CA is in use   }
  407.     telCACallPickupMsg            = $00080000;                    {  CA pickup activity  }
  408.     telCAPagingMsg                = $00100000;                    {  CA paging activity  }
  409.     telCAIntercomMsg            = $00200000;                    {  CA intercom activity  }
  410.     telCAModemToneMsg            = $00400000;                    {  modem tones detected  }
  411.     telCAFaxToneMsg                = $00800000;                    {  fax tones detected  }
  412.     telCAIdleMsg                = $01000000;                    {  CA is in idle state  }
  413.     telCASuccessiveAlertMsg        = $02000000;                    {  phone is alerting, one per ring  }
  414.     telCAUserUserInfoMsg        = $04000000;                    {  user to user information has arrrived  }
  415.                                                                 {  for this CA  }
  416.     telCAHandOffMsg                = $08000000;                    {  CA is ready for hand-off  }
  417.     telCAVoiceDetectedMsg        = $10000000;                    {  voice Detect related event  }
  418.     telCASilenceDetectedMsg        = $20000000;                    {  silence Detect related event  }
  419.     telCADigitsImmMsg            = $40000000;                    {  immidiate arrival of remote signaling digits  }
  420.     telCAOtherMsg                = $80000000;                    {  tool specific CA message  }
  421.     telAllCAMsgs                = $7FFFFFFF;                    {  mask to all non tool specific CA events  }
  422.  
  423.  
  424. TYPE
  425.     TELErr                                = OSErr;
  426.     TELFlags                            = LONGINT;
  427.  
  428. CONST
  429.     telNoMenus                    = $00010000;                    {  tells tool not to display any custom menus  }
  430.     telQuiet                    = $00020000;                    {  tells tool not to display any dialog boxes or alerts  }
  431.     telConfigChanged            = $00040000;                    {  notifies application that the config has changed  }
  432.  
  433.  
  434. TYPE
  435.     TELFeatureFlags                        = LONGINT;
  436.  
  437. CONST
  438.     pcmAvail                    = $00000001;                    {  true if PCM voice data accessible  }
  439.     hasHandset                    = $00000002;                    {  true if a phone handset is attached   }
  440.     hasSpeakerphone                = $00000004;                    {  true if a 2 way speakerphone is attached  }
  441.     canOnHookDial                = $00000008;                    {  can on-hook dial  }
  442.     hasRinger                    = $00000010;                    {  terminal has its own ringer  }
  443.     canSetDisplay                = $00000020;                    {  application can write to the display  }
  444.     hasKeypad                    = $00000040;                    {  attached phone has standard 12 key pad  }
  445.     hasVideo                    = $00000080;                    {  terminal has a videophone  }
  446.     hasOther                    = $00000100;                    {  reserved for future use  }
  447.     crossDNConference            = $00000200;                    {  can perform cross-DN conferences  }
  448.     hasSubaddress                = $00000400;                    {  attached network supports subaddressing  }
  449.     hasUserUserInfo                = $00000800;                    {  network supports user-to-user info  }
  450.     hasHandsetSoundStreams        = $00001000;                    {  sound streams are supported on the handset  }
  451.     hasIndHandset                = $00002000;                    {  handset can be accessed independently of the phone line  }
  452.     hasBuiltinSpeakerphone        = $00004000;                    {  speaker and microphone of the Mac can be used  }
  453.  
  454.  
  455.  
  456. TYPE
  457.     TELTermRecordPtr = ^TELTermRecord;
  458.     TELTermRecord = RECORD
  459.         tRef:                    INTEGER;
  460.         featureFlags:            TELFeatureFlags;
  461.         handsetSpeakerVol:        INTEGER;
  462.         handsetMicVol:            INTEGER;
  463.         speakerphoneVol:        INTEGER;
  464.         speakerphoneMicVol:        INTEGER;
  465.         ringerVol:                INTEGER;
  466.         otherVol:                INTEGER;
  467.         ringerTypes:            INTEGER;
  468.         hasDisplay:                INTEGER;
  469.         displayRows:            INTEGER;
  470.         numDNs:                    INTEGER;
  471.         maxAllocCA:                INTEGER;
  472.         curAllocCA:                INTEGER;
  473.         builtinSpeakerVol:        INTEGER;
  474.         builtinSpeakerMicVol:    INTEGER;
  475.         reserved:                LONGINT;
  476.     END;
  477.  
  478.     TELTermPtr                            = ^TELTermRecord;
  479.     TELRecordPtr = ^TELRecord;
  480.     TELRecord = RECORD
  481.         procID:                    INTEGER;
  482.         flags:                    TELFlags;
  483.         reserved:                INTEGER;
  484.         refCon:                    LONGINT;
  485.         userData:                LONGINT;
  486.         defproc:                UniversalProcPtr;
  487.         config:                    Ptr;
  488.         oldConfig:                Ptr;
  489.         pTELTerm:                TELTermPtr;
  490.         telPrivate:                LONGINT;
  491.         reserved1:                LONGINT;
  492.         reserved2:                LONGINT;
  493.         pTELTermSize:            LONGINT;
  494.         version:                INTEGER;
  495.     END;
  496.  
  497.     TELPtr                                = ^TELRecord;
  498.     TELHandle                            = ^TELPtr;
  499.     TELDNFeatureFlags                    = LONGINT;
  500.  
  501. CONST
  502.     dndSub                        = $00000001;                    {  do not disturb subscribed  }
  503.     dndAvail                    = $00000002;                    {  do not disturb available  }
  504.     dndActive                    = $00000004;                    {  do not disturb active  }
  505.     voiceMailAccessSub            = $00000008;                    {  message waiting subscribed  }
  506.     voiceMailAccessAvail        = $00000010;                    {  message waiting available  }
  507.     voiceMailAccessActive        = $00000020;                    {  message waiting active  }
  508.     pagingSub                    = $00000040;                    {  paging is subscribed  }
  509.     pagingAvail                    = $00000080;                    {  paging is available  }
  510.     pagingActive                = $00000100;                    {  paging is active  }
  511.     intercomSub                    = $00000200;                    {  intercom is subscribed  }
  512.     intercomAvail                = $00000400;                    {  intercom is available  }
  513.     intercomActive                = $00000800;                    {  intercom is active  }
  514.     dnSelectSub                    = $00001000;                    {  DN select is subscribed  }
  515.     dnSelectAvail                = $00002000;                    {  DN select is available  }
  516.     dnSelectActive                = $00004000;                    {  DN is selected  }
  517.     callPickupSub                = $00008000;                    {  call pickup is subscribed  }
  518.     callPickupAvail                = $00010000;                    {  call pickup is available  }
  519.     dnInUse                        = $00020000;                    {  a CA is allocated for this DN  }
  520.     logicalDN                    = $00040000;                    {  this DN is not on this terminal  }
  521.     dnAccessible                = $00080000;                    {  commands can be sent to this DN  }
  522.     canInitiate                    = $00100000;                    {  an outgoing CA can be initiated  }
  523.     voiceMessageWaiting            = $00200000;                    {  voice mail waiting for this dn  }
  524.     hasDNSoundStreams            = $00400000;                    {  sound streams are supported on this DN  }
  525.     autoAnswerAvail                = $00800000;                    {  AutoAnswer is set for this DN  }
  526.     autoAnswerActive            = $01000000;                    {  AutoAnswer is currently applied to CA on this DN  }
  527.     tollSaverAvail                = $02000000;                    {  tollSaver is set for this DN  }
  528.     tollSaverActive                = $04000000;                    {  tollSaver is currently applied to CA on this DN  }
  529.  
  530.  
  531. TYPE
  532.     TELDNForwardFlags                    = LONGINT;
  533.  
  534. CONST
  535.     immediateForwardSub            = $00000001;                    {  immediate call forward subscribed  }
  536.     immediateForwardAvail        = $00000002;                    {  immediate call forward available  }
  537.     immediateForwardActive        = $00000004;                    {  immediate call forward active  }
  538.     busyForwardSub                = $00000008;                    {  forward on busy subscribed  }
  539.     busyForwardAvail            = $00000010;                    {  forward on busy available  }
  540.     busyForwardActive            = $00000020;                    {  forward on busy active  }
  541.     noAnswerForwardSub            = $00000040;                    {  no answer call forward subscribed  }
  542.     noAnswerForwardAvail        = $00000080;                    {  no answer call forward available  }
  543.     noAnswerForwardActive        = $00000100;                    {  no answer call forward active  }
  544.     busyNAForwardSub            = $00000200;                    {  busy & no answer call forward subscribed  }
  545.     busyNAForwardAvail            = $00000400;                    {  busy & no answer call forward available  }
  546.     busyNAForwardActive            = $00000800;                    {  busy & no answer call forward active  }
  547.  
  548.  
  549.  
  550. TYPE
  551.     TELDNRecordPtr = ^TELDNRecord;
  552.     TELDNRecord = RECORD
  553.         dnRef:                    INTEGER;
  554.         dn:                        StringPtr;
  555.         dnPartyName:            StringPtr;
  556.         dnSubaddress:            StringPtr;
  557.         hTEL:                    TELHandle;
  558.         maxAllocCA:                INTEGER;
  559.         curAllocCA:                INTEGER;
  560.         dnType:                    INTEGER;
  561.         featureFlags:            TELDNFeatureFlags;
  562.         numPageIDs:                INTEGER;
  563.         numIntercomIDs:            INTEGER;
  564.         numPickupIDs:            INTEGER;
  565.         forwardFlags:            TELDNForwardFlags;
  566.         iForwardDN:                StringPtr;
  567.         iForwardSubaddress:        StringPtr;
  568.         iForwardPartyName:        StringPtr;
  569.         bForwardDN:                StringPtr;
  570.         bForwardSubaddress:        StringPtr;
  571.         bForwardPartyName:        StringPtr;
  572.         naForwardDN:            StringPtr;
  573.         naForwardSubaddress:    StringPtr;
  574.         naForwardPartyName:        StringPtr;
  575.         naForwardRings:            INTEGER;
  576.         telDNPrivate:            LONGINT;
  577.         refCon:                    LONGINT;
  578.         userData:                LONGINT;
  579.         reserved:                LONGINT;
  580.     END;
  581.  
  582.     TELDNPtr                            = ^TELDNRecord;
  583.     TELDNHandle                            = ^TELDNPtr;
  584.     TELCAFeatureFlags                    = LONGINT;
  585.  
  586. CONST
  587.     holdSub                        = $00000001;                    {  hold subscribed   }
  588.     holdAvail                    = $00000002;                    {  hold available   }
  589.     holdActive                    = $00000004;                    {  hold active   }
  590.     conferenceSub                = $00000008;                    {  conference subscribed  }
  591.     conferenceAvail                = $00000010;                    {  conference available  }
  592.     conferenceActive            = $00000020;                    {  conference active   }
  593.     conferenceDropSub            = $00000040;                    {  conference drop subscribed   }
  594.     conferenceDropAvail            = $00000080;                    {  a call to TELDrop will drop this  }
  595.                                                                 {  CA only from a conference  }
  596.     conferenceSplitSub            = $00000100;                    {  conference split subscribed   }
  597.     conferenceSplitAvail        = $00000200;                    {  conference split available for this CA  }
  598.     numToConferenceRequired        = $00000400;                    {  the number of CAs to be conferenced is  }
  599.                                                                 {  required in TELConfPrep   }
  600.     transferSub                    = $00000800;                    {  transfer subscribed   }
  601.     transferAvail                = $00001000;                    {  transfer available   }
  602.     transferActive                = $00002000;                    {  transfer active  }
  603.     caRelated                    = $00004000;                    {  this CA is the specified in some other CA's relatedCA field }
  604.  
  605.  
  606. TYPE
  607.     TELCAOtherFeatures                    = LONGINT;
  608.  
  609. CONST
  610.     callbackSub                    = $00000001;                    {  call back subscribed  }
  611.     callbackAvail                = $00000002;                    {  call back available  }
  612.     callbackActive                = $00000004;                    {  call back active   }
  613.     callbackClearSub            = $00000008;                    {  call back clearing subscribed  }
  614.     callbackNowSub                = $00000010;                    {  call back now subscribed  }
  615.     callbackNowAvail            = $00000020;                    {  call back now available   }
  616.     callbackBusy                = $00000040;                    {  call back on busy  }
  617.     callbackNoAnswer            = $00000080;                    {  call back on no answer  }
  618.     callbackReturnsRef            = $00000100;                    {  call back returns a reference  }
  619.     parkSub                        = $00000200;                    {  call park subscribed  }
  620.     parkAvail                    = $00000400;                    {  call park available  }
  621.     parkActive                    = $00000800;                    {  call park active  }
  622.     parkRetrieveSub                = $00001000;                    {  call park retrieve subscribed  }
  623.     parkRetrieveWithID            = $00002000;                    {  retrieve parked calls with IDs  }
  624.     parkWithReturnedID            = $00004000;                    {  park call to a specific remote ID  }
  625.     parkWithGivenID                = $00040000;                    {  for switch that requires ID for parking  }
  626.     rejectable                    = $00008000;                    {  CA is rejectable   }
  627.     deflectable                    = $00010000;                    {  CA is deflectable   }
  628.     acceptable                    = $00020000;                    {  CA is acceptable  }
  629.     voiceDetected                = $00080000;                    {  voice has been detected on this CA incase of  }
  630.                                                                 {  an incoming call  }
  631.     callAnswdTSRings            = $00100000;                    {  incoimng call was answered on TollSaver rings  }
  632.  
  633.  
  634. TYPE
  635.     TELCARecordPtr = ^TELCARecord;
  636.     TELCAPtr                            = ^TELCARecord;
  637.     TELCAHandle                            = ^TELCAPtr;
  638.     TELCARecord = RECORD
  639.         caRef:                    INTEGER;
  640.         hTELDN:                    TELDNHandle;
  641.         hTEL:                    TELHandle;
  642.         caState:                INTEGER;
  643.         relatedCA:                TELCAHandle;
  644.         connectTime:            LONGINT;                                {  can be used by application to keep track of connect time  }
  645.         intExt:                    INTEGER;
  646.         callType:                INTEGER;
  647.         dialType:                INTEGER;
  648.         bearerType:                INTEGER;
  649.         rate:                    INTEGER;
  650.         rmtDN:                    StringPtr;
  651.         rmtPartyName:            StringPtr;
  652.         rmtSubaddress:            StringPtr;
  653.         routeDN:                StringPtr;
  654.         routePartyName:            StringPtr;
  655.         routeSubaddress:        StringPtr;
  656.         priority:                INTEGER;
  657.         conferenceLimit:        INTEGER;
  658.         featureFlags:            TELCAFeatureFlags;
  659.         otherFeatures:            TELCAOtherFeatures;
  660.         telCAPrivate:            LONGINT;
  661.         refCon:                    LONGINT;
  662.         userData:                LONGINT;
  663.         reserved:                LONGINT;
  664.     END;
  665.  
  666. { Constants for HandleType in structure above }
  667.  
  668. CONST
  669.     telHandleType                = 0;                            {  feature requires a terminal handle  }
  670.     telDNHandleType                = 1;                            {  feature requires a DN handle  }
  671.     telCAHandleType                = 2;                            {  feature requires a CA handle  }
  672.  
  673.  
  674. TYPE
  675.     FeatureListPtr = ^FeatureList;
  676.     FeatureList = RECORD
  677.         featureID:                INTEGER;
  678.         featureName:            StringPtr;
  679.         handleType:                INTEGER;
  680.         nextFeature:            FeatureListPtr;
  681.     END;
  682.  
  683. { CA MESSAGE STRUCTURES FOR MSGINFO }
  684.     CAGenericMsgRecPtr = ^CAGenericMsgRec;
  685.     CAGenericMsgRec = RECORD
  686.         rmtDN:                    StringPtr;
  687.         rmtName:                StringPtr;
  688.         rmtSubaddress:            StringPtr;
  689.         dialType:                INTEGER;
  690.     END;
  691.  
  692.     CAUserUserInfoMsgRecPtr = ^CAUserUserInfoMsgRec;
  693.     CAUserUserInfoMsgRec = RECORD
  694.         userUserInfo:            StringPtr;
  695.     END;
  696.  
  697.     CAConfMsgRecPtr = ^CAConfMsgRec;
  698.     CAConfMsgRec = RECORD
  699.         relatedCA:                TELCAHandle;
  700.     END;
  701.  
  702.     CATransfMsgRecPtr = ^CATransfMsgRec;
  703.     CATransfMsgRec = RECORD
  704.         rmtDN:                    StringPtr;
  705.         rmtName:                StringPtr;
  706.         rmtSubaddress:            StringPtr;
  707.         dialType:                INTEGER;
  708.         prepCA:                    TELCAHandle;
  709.     END;
  710.  
  711.     TelephoneTermMsgProcPtr = ProcPtr;  { PROCEDURE TelephoneTermMsg(hTEL: TELHandle; msg: LONGINT; mtype: INTEGER; value: INTEGER; globals: LONGINT); }
  712.  
  713.     TelephoneDNMsgProcPtr = ProcPtr;  { PROCEDURE TelephoneDNMsg(hTELDN: TELDNHandle; Msg: LONGINT; mtype: INTEGER; value: INTEGER; rmtDN: ConstStr255Param; rmtName: ConstStr255Param; rmtSubaddress: ConstStr255Param; globals: LONGINT); }
  714.  
  715.     TelephoneCAMsgProcPtr = ProcPtr;  { PROCEDURE TelephoneCAMsg(hTELCA: TELCAHandle; Msg: LONGINT; mtype: INTEGER; value: INTEGER; Msginfo: Ptr; globals: LONGINT); }
  716.  
  717.     TelephoneChooseIdleProcPtr = ProcPtr;  { PROCEDURE TelephoneChooseIdle; }
  718.  
  719.     TelephoneTermMsgUPP = UniversalProcPtr;
  720.     TelephoneDNMsgUPP = UniversalProcPtr;
  721.     TelephoneCAMsgUPP = UniversalProcPtr;
  722.     TelephoneChooseIdleUPP = UniversalProcPtr;
  723.  
  724. CONST
  725.     uppTelephoneTermMsgProcInfo = $0000EBC0;
  726.     uppTelephoneDNMsgProcInfo = $003FEBC0;
  727.     uppTelephoneCAMsgProcInfo = $0003EBC0;
  728.     uppTelephoneChooseIdleProcInfo = $00000000;
  729.  
  730. FUNCTION NewTelephoneTermMsgProc(userRoutine: TelephoneTermMsgProcPtr): TelephoneTermMsgUPP;
  731.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  732.     INLINE $2E9F;
  733.     {$ENDC}
  734.  
  735. FUNCTION NewTelephoneDNMsgProc(userRoutine: TelephoneDNMsgProcPtr): TelephoneDNMsgUPP;
  736.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  737.     INLINE $2E9F;
  738.     {$ENDC}
  739.  
  740. FUNCTION NewTelephoneCAMsgProc(userRoutine: TelephoneCAMsgProcPtr): TelephoneCAMsgUPP;
  741.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  742.     INLINE $2E9F;
  743.     {$ENDC}
  744.  
  745. FUNCTION NewTelephoneChooseIdleProc(userRoutine: TelephoneChooseIdleProcPtr): TelephoneChooseIdleUPP;
  746.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  747.     INLINE $2E9F;
  748.     {$ENDC}
  749.  
  750. PROCEDURE CallTelephoneTermMsgProc(hTEL: TELHandle; msg: LONGINT; mtype: INTEGER; value: INTEGER; globals: LONGINT; userRoutine: TelephoneTermMsgUPP);
  751.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  752.     INLINE $205F, $4E90;
  753.     {$ENDC}
  754.  
  755. PROCEDURE CallTelephoneDNMsgProc(hTELDN: TELDNHandle; Msg: LONGINT; mtype: INTEGER; value: INTEGER; rmtDN: ConstStr255Param; rmtName: ConstStr255Param; rmtSubaddress: ConstStr255Param; globals: LONGINT; userRoutine: TelephoneDNMsgUPP);
  756.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  757.     INLINE $205F, $4E90;
  758.     {$ENDC}
  759.  
  760. PROCEDURE CallTelephoneCAMsgProc(hTELCA: TELCAHandle; Msg: LONGINT; mtype: INTEGER; value: INTEGER; Msginfo: Ptr; globals: LONGINT; userRoutine: TelephoneCAMsgUPP);
  761.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  762.     INLINE $205F, $4E90;
  763.     {$ENDC}
  764.  
  765. PROCEDURE CallTelephoneChooseIdleProc(userRoutine: TelephoneChooseIdleUPP);
  766.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  767.     INLINE $205F, $4E90;
  768.     {$ENDC}
  769. FUNCTION InitTEL: TELErr;
  770. FUNCTION TELGetInfo(hTEL: TELHandle): TELErr;
  771. FUNCTION TELOpenTerm(hTEL: TELHandle): TELErr;
  772. FUNCTION TELResetTerm(hTEL: TELHandle): TELErr;
  773. FUNCTION TELCloseTerm(hTEL: TELHandle): TELErr;
  774. FUNCTION TELTermMsgHand(hTEL: TELHandle; eventMask: LONGINT; msgProc: TelephoneTermMsgUPP; globals: LONGINT): TELErr;
  775. FUNCTION TELClrTermMsgHand(hTEL: TELHandle; msgProc: TelephoneTermMsgUPP): TELErr;
  776. FUNCTION TELTermEventsSupp(hTEL: TELHandle; VAR eventMask: LONGINT): TELErr;
  777. FUNCTION TELGetProcID(VAR name: Str255): INTEGER;
  778. FUNCTION TELNew(procID: INTEGER; flags: TELFlags; refCon: LONGINT; userData: LONGINT): TELHandle;
  779. FUNCTION TELNewWithResult(procID: INTEGER; flags: TELFlags; refCon: LONGINT; userData: LONGINT; VAR error: TELErr): TELHandle;
  780. FUNCTION TELDefault(VAR theConfig: Ptr; procID: INTEGER; allocate: BOOLEAN): TELErr;
  781. FUNCTION TELValidate(hTEL: TELHandle): BOOLEAN;
  782. FUNCTION TELGetConfig(hTEL: TELHandle): Ptr;
  783. FUNCTION TELSetConfig(hTEL: TELHandle; thePtr: Ptr): INTEGER;
  784. FUNCTION TELChoose(VAR hTEL: TELHandle; where: Point; idleProc: TelephoneChooseIdleProcPtr): TELErr;
  785. FUNCTION TELSetupPreflight(procID: INTEGER; VAR magicCookie: LONGINT): Handle;
  786. PROCEDURE TELSetupSetup(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; VAR magicCookie: LONGINT);
  787. FUNCTION TELSetupFilter(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; VAR theEvent: EventRecord; VAR theItem: INTEGER; VAR magicCookie: LONGINT): BOOLEAN;
  788. PROCEDURE TELSetupItem(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; VAR theItem: INTEGER; VAR magicCookie: LONGINT);
  789. PROCEDURE TELSetupCleanup(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; VAR magicCookie: LONGINT);
  790. PROCEDURE TELSetupXCleanup(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; OKed: BOOLEAN; VAR magicCookie: LONGINT);
  791. PROCEDURE TELSetupPostflight(procID: INTEGER);
  792. FUNCTION TELDispose(hTEL: TELHandle): TELErr;
  793. FUNCTION TELCountDNs(hTEL: TELHandle; dnType: INTEGER; physical: BOOLEAN): INTEGER;
  794. FUNCTION TELDNLookupByIndex(hTEL: TELHandle; dnType: INTEGER; physical: BOOLEAN; index: INTEGER; VAR hTELDN: TELDNHandle): TELErr;
  795. FUNCTION TELDNLookupByName(hTEL: TELHandle; DN: ConstStr255Param; VAR hTELDN: TELDNHandle): TELErr;
  796. FUNCTION TELDNSelect(hTELDN: TELDNHandle; select: BOOLEAN): TELErr;
  797. FUNCTION TELDNDispose(hTELDN: TELDNHandle): TELErr;
  798. FUNCTION TELGetDNInfo(hTELDN: TELDNHandle): TELErr;
  799. FUNCTION TELGetDNFlags(hTELDN: TELDNHandle; VAR dnFeatureFlags: LONGINT; VAR dnForwardFlags: LONGINT): TELErr;
  800. FUNCTION TELDNMsgHand(hTELDN: TELDNHandle; allDNs: BOOLEAN; eventMask: LONGINT; msgProc: TelephoneDNMsgProcPtr; globals: LONGINT): TELErr;
  801. FUNCTION TELClrDNMsgHand(hTELDN: TELDNHandle; msgProc: TelephoneDNMsgProcPtr): TELErr;
  802. FUNCTION TELDNEventsSupp(hTELDN: TELDNHandle; VAR eventMask: LONGINT): TELErr;
  803. FUNCTION TELCountCAs(hTELDN: TELDNHandle; internalExternal: INTEGER): INTEGER;
  804. FUNCTION TELCALookup(hTELDN: TELDNHandle; internalExternal: INTEGER; index: INTEGER; VAR hTELCA: TELCAHandle): TELErr;
  805. FUNCTION TELCADispose(hTELCA: TELCAHandle): TELErr;
  806. FUNCTION TELGetCAState(hTELCA: TELCAHandle; VAR state: INTEGER): TELErr;
  807. FUNCTION TELGetCAFlags(hTELCA: TELCAHandle; VAR caFeatureFlags: LONGINT; VAR caOtherFeatures: LONGINT): TELErr;
  808. FUNCTION TELGetCAInfo(hTELCA: TELCAHandle): TELErr;
  809. FUNCTION TELCAMsgHand(hTELDN: TELDNHandle; eventMask: LONGINT; msgProc: TelephoneCAMsgProcPtr; globals: LONGINT): TELErr;
  810. FUNCTION TELClrCAMsgHand(hTELDN: TELDNHandle; msgProc: TelephoneCAMsgProcPtr): TELErr;
  811. FUNCTION TELCAEventsSupp(hTELDN: TELDNHandle; VAR eventMask: LONGINT): TELErr;
  812. FUNCTION TELSetupCall(hTELDN: TELDNHandle; VAR hTELCA: TELCAHandle; destDN: ConstStr255Param; destName: ConstStr255Param; destSubaddress: ConstStr255Param; userUserInfo: ConstStr255Param; bearerType: INTEGER; rate: INTEGER): TELErr;
  813. FUNCTION TELConnect(hTELCA: TELCAHandle): TELErr;
  814. FUNCTION TELDialDigits(hTELCA: TELCAHandle; digits: ConstStr255Param): TELErr;
  815. FUNCTION TELAcceptCall(hTELCA: TELCAHandle): TELErr;
  816. FUNCTION TELRejectCall(hTELCA: TELCAHandle; reason: INTEGER): TELErr;
  817. FUNCTION TELDeflectCall(hTELCA: TELCAHandle; rmtDN: ConstStr255Param; rmtName: ConstStr255Param; rmtSubaddress: ConstStr255Param): TELErr;
  818. FUNCTION TELAnswerCall(hTELCA: TELCAHandle): TELErr;
  819. FUNCTION TELDrop(hTELCA: TELCAHandle; userUserInfo: ConstStr255Param): TELErr;
  820. FUNCTION TELHold(hTELCA: TELCAHandle): TELErr;
  821. FUNCTION TELRetrieve(hTELCA: TELCAHandle): TELErr;
  822. FUNCTION TELConferencePrep(hTELCA1: TELCAHandle; hTELCA2: TELCAHandle; numToConference: INTEGER): TELErr;
  823. FUNCTION TELConferenceEstablish(hTELCA1: TELCAHandle; hTELCA2: TELCAHandle): TELErr;
  824. FUNCTION TELConferenceSplit(hTELCA: TELCAHandle): TELErr;
  825. FUNCTION TELTransferPrep(hTELCA1: TELCAHandle; hTELCA2: TELCAHandle): TELErr;
  826. FUNCTION TELTransferEstablish(hTELCA1: TELCAHandle; hTELCA2: TELCAHandle): TELErr;
  827. FUNCTION TELTransferBlind(hTELCA: TELCAHandle; rmtDN: ConstStr255Param; rmtName: ConstStr255Param; rmtSubaddress: ConstStr255Param): TELErr;
  828. FUNCTION TELForwardSet(hTELDN: TELDNHandle; forwardDN: ConstStr255Param; forwardName: ConstStr255Param; forwardSubaddress: ConstStr255Param; forwardType: INTEGER; numrings: INTEGER): TELErr;
  829. FUNCTION TELForwardClear(hTELDN: TELDNHandle; forwardType: INTEGER): TELErr;
  830. FUNCTION TELCallbackSet(hTELCA: TELCAHandle; VAR callbackRef: INTEGER): TELErr;
  831. FUNCTION TELCallbackClear(hTEL: TELHandle; callbackRef: INTEGER): TELErr;
  832. FUNCTION TELCallbackNow(hTELCA: TELCAHandle; callbackRef: INTEGER): TELErr;
  833. FUNCTION TELDNDSet(hTELDN: TELDNHandle; dndType: INTEGER): TELErr;
  834. FUNCTION TELDNDClear(hTELDN: TELDNHandle; dndType: INTEGER): TELErr;
  835. FUNCTION TELCallPickup(hTELCA: TELCAHandle; pickupDN: ConstStr255Param; pickupGroupID: INTEGER): TELErr;
  836. FUNCTION TELParkCall(hTELCA: TELCAHandle; VAR parkRetrieveID: StringPtr; parkID: ConstStr255Param): TELErr;
  837. FUNCTION TELRetrieveParkedCall(hTELCA: TELCAHandle; parkRetrieveID: ConstStr255Param): TELErr;
  838. FUNCTION TELVoiceMailAccess(hTELCA: TELCAHandle): TELErr;
  839. FUNCTION TELPaging(hTELCA: TELCAHandle; pageID: INTEGER): TELErr;
  840. FUNCTION TELIntercom(hTELCA: TELCAHandle; intercomID: INTEGER): TELErr;
  841. FUNCTION TELOtherFeatureList(hTEL: TELHandle; VAR fList: FeatureListPtr): TELErr;
  842. FUNCTION TELOtherFeatureImplement(hTEL: TELHandle; theHandle: Handle; featureID: INTEGER): TELErr;
  843. FUNCTION TELToolFunctions(hTEL: TELHandle; msgcode: INTEGER; VAR supportsIt: BOOLEAN): TELErr;
  844. FUNCTION TELOtherFunction(hTEL: TELHandle; paramblock: Ptr; size: LONGINT): TELErr;
  845. FUNCTION TELGetHooksw(hTEL: TELHandle; hookType: INTEGER; VAR offHook: BOOLEAN): TELErr;
  846. FUNCTION TELSetHooksw(hTEL: TELHandle; hookType: INTEGER; offHook: BOOLEAN): TELErr;
  847. FUNCTION TELGetVolume(hTEL: TELHandle; volType: INTEGER; VAR level: INTEGER; VAR volState: INTEGER): TELErr;
  848. FUNCTION TELSetVolume(hTEL: TELHandle; volType: INTEGER; VAR level: INTEGER; volState: INTEGER): TELErr;
  849. FUNCTION TELAlert(hTEL: TELHandle; VAR level: INTEGER; alertPattern: INTEGER): TELErr;
  850. FUNCTION TELGetDisplay(hTEL: TELHandle; index: INTEGER; VAR displayMode: INTEGER; VAR text: StringPtr): TELErr;
  851. FUNCTION TELSetDisplay(hTEL: TELHandle; index: INTEGER; displayMode: INTEGER; text: ConstStr255Param): TELErr;
  852. PROCEDURE TELIdle(hTEL: TELHandle);
  853. PROCEDURE TELActivate(hTEL: TELHandle; activate: BOOLEAN);
  854. PROCEDURE TELResume(hTEL: TELHandle; resume: BOOLEAN);
  855. FUNCTION TELMenu(hTEL: TELHandle; menuID: INTEGER; item: INTEGER): BOOLEAN;
  856. PROCEDURE TELEvent(hTEL: TELHandle; {CONST}VAR theEvent: EventRecord);
  857. PROCEDURE TELGetToolName(procID: INTEGER; VAR name: Str255);
  858. FUNCTION TELGetVersion(hTEL: TELHandle): Handle;
  859. FUNCTION TELGetTELVersion: INTEGER;
  860. FUNCTION TELIntlToEnglish(hTEL: TELHandle; inputPtr: Ptr; VAR outputPtr: Ptr; language: INTEGER): TELErr;
  861. FUNCTION TELEnglishToIntl(hTEL: TELHandle; inputPtr: Ptr; VAR outputPtr: Ptr; language: INTEGER): TELErr;
  862. FUNCTION TELGetDNSoundInput(hTELDN: TELDNHandle; VAR deviceName: Str255): TELErr;
  863. FUNCTION TELDisposeDNSoundInput(hTELDN: TELDNHandle; deviceName: ConstStr255Param): TELErr;
  864. FUNCTION TELGetDNSoundOutput(hTELDN: TELDNHandle; VAR SndOut: Component): TELErr;
  865. FUNCTION TELDisposeDNSoundOutput(hTELDN: TELDNHandle; SndOut: Component): TELErr;
  866. FUNCTION TELGetHSSoundInput(termHand: TELHandle; VAR deviceName: Str255): TELErr;
  867. FUNCTION TELDisposeHSSoundInput(termHand: TELHandle; deviceName: ConstStr255Param): TELErr;
  868. FUNCTION TELGetHSSoundOutput(termHand: TELHandle; VAR SndOut: Component): TELErr;
  869. FUNCTION TELDisposeHSSoundOutput(termHand: TELHandle; SndOut: Component): TELErr;
  870. FUNCTION TELDNSetAutoAnswer(hTELDN: TELDNHandle; AutoAnswerOn: BOOLEAN): TELErr;
  871. FUNCTION TELDNTollSaverControl(hTELDN: TELDNHandle; QuickAnswer: BOOLEAN): TELErr;
  872. FUNCTION TELSetIndHSConnect(termHand: TELHandle; Connect: BOOLEAN): TELErr;
  873. FUNCTION TELGetIndHSConnect(termHand: TELHandle; VAR Connect: BOOLEAN): TELErr;
  874. FUNCTION TELCAVoiceDetect(hTELCA: TELCAHandle; VoiceDetectOn: BOOLEAN): TELErr;
  875. FUNCTION TELCASilenceDetect(hTELCA: TELCAHandle; DetectOn: BOOLEAN; Period: LONGINT): TELErr;
  876. FUNCTION TELGetTelNewErr: TELErr;
  877. FUNCTION TELDNSetDTMF(hTELDN: TELDNHandle; dtmfOn: BOOLEAN): TELErr;
  878. FUNCTION TELDNGetDTMF(hTELDN: TELDNHandle; VAR dtmfOn: BOOLEAN): TELErr;
  879. FUNCTION TELHSSetDTMF(termHand: TELHandle; dtmfOn: BOOLEAN): TELErr;
  880. FUNCTION TELHSGetDTMF(termHand: TELHandle; VAR dtmfOn: BOOLEAN): TELErr;
  881. FUNCTION TELGetDNStatus(hTELDN: TELDNHandle; VAR inUse: LONGINT): TELErr;
  882. FUNCTION TELGetDNProgressDet(hTELDN: TELDNHandle; selector: LONGINT; VAR prgDetOn: BOOLEAN): TELErr;
  883. FUNCTION TELSetDNProgressDet(hTELDN: TELDNHandle; selector: LONGINT; prgDetOn: BOOLEAN): TELErr;
  884.  
  885. {$ALIGN RESET}
  886. {$POP}
  887.  
  888. {$SETC UsingIncludes := TelephonesIncludes}
  889.  
  890. {$ENDC} {__TELEPHONES__}
  891.  
  892. {$IFC NOT UsingIncludes}
  893.  END.
  894. {$ENDC}
  895.